package com.example.attendancesystem.Tools;

import java.io.File;

public class FileTools {
    public static boolean savaFile(String filePath, File file, String empNumber) {
        try {
            File newFile = new File(filePath + empNumber + file.getName());
            newFile.createNewFile();
            return true;
        } catch (Exception e) {
            return false;
        }
    }

    public static boolean delFile(String filePath, String fileName) {
        try {
            File oldFile = new File(filePath + fileName);
            oldFile.delete();
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
